<template>
  <div class="a" style="height:2000px">
    我是文档
    <p id="abc">定位到这个元素</p>

   <h1> {{test}}</h1>
  </div>
</template>

<script>
    export default {
      data(){
        return{
          test:'改变前'
        }
      },
      beforeRouteEnter(to,from,next){
        console.log('单个组件钩子函数 beforeRouteEnter');
        next()
      }
    }
</script>
<style>

</style>
